package com.hpjpw.idoapp.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.util.Date;

public class TopicImportVo {
    private static final long serialVersionUID = 1L;

    /** 每周主题内容 */
    @Excel(name = "每周主题内容")
    private String content;

    /** 主题开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "主题开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date beginDate;

    /** 主题结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "主题结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /* 未导入创建时间，但是会自动生成导入时间为创建时间 */

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @NotBlank(message = "每周主题内容不能为空")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @NotBlank(message = "主题开始时间不能为空")
    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    @NotBlank(message = "主题结束时间不能为空")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("content", content)
                .append("beginDate", beginDate)
                .append("endDate", endDate)
                .toString();
    }
}
